home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / WWIV Mods / WWIVMOD.ZIP / SPOT013.MOD < prev    next >
Encoding:
Text File  |  1994-01-06  |  7.8 KB  |  251 lines

  1. Spotnick #1 @5497
  2. Sun Dec 12 22:10:08 1993
  3. 0R: net33: @4076 (via @4061) [08:11 12/14/93]
  4. 0R: net33: @4050 (via @4064) [07:25 12/14/93]
  5. 0R: net33: @4064 (via @1040) [05:58 12/14/93]
  6. 0R: net33: @1040 (via @2050) [13:02 12/13/93]
  7. 0R: net34: @2050 [10:33 12/13/93]
  8. 0R: net34: @2050 (via @1040) [22:56 12/12/93]
  9. 0R: net33: @1040 (via @1046) [23:44 12/12/93]
  10. 0R: net33: @1046 (via @5497) [23:02 12/11/93]
  11. 0R: net33: @5497 [22:11 12/12/93]
  12. 0R: net33: @5497 [22:10 12/12/93]
  13. ╓────────────────────────────────────────────────────────────────────────────╖
  14. ║ Mod Name      : SPOT013.MOD          Mod Author: Spotnick 1@5497 WWIVnet   ║█
  15. ║ Difficulty    : █▒▒▒▒▒▒▒▒▒                                1@5497 WWIVlink  ║█
  16. ║ WWIV Version  : 4.23                                      1@5497 IceNET    ║█
  17. ║ Mod Date      : 12/13/93                                  1@5497 TerraNET  ║█
  18. ║ Files Affected: MISCCMD.C                                 1@5497 RockNET   ║█
  19. ║ Description   : New BBSLIST For WWIV v4.23                                 ║█
  20. ╙────────────────────────────────────────────────────────────────────────────╜█
  21.   ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  22.  
  23. Hello folks, this is the 13th mod I released since v4.22, and it is now time
  24. to go through 4.23 which I had the chance to beta test.
  25.  
  26. /* Long Description */
  27.  
  28.         This adds a lot of features to your BBSLIST, idea has been stolen from
  29. the Vision-X software, it will put your BBSlist in a box and ask more
  30. informations about for it, check it out, much better than standard.
  31.  
  32.  
  33.  
  34. Step 1 and ONLY step in source code:
  35. ------------------------------------
  36.  
  37. Load MISCCMD.C and remplace void bbslist(void) with this new one
  38.  
  39.  
  40. void bbslist(void)
  41. {
  42.   int i,f,done,ok;
  43.   char s[150],s1[150],ch,ch1,*ss,s2[150],s3[81];
  44.   char phone[13], name[30], speed[5], type[10], meg[10], nup[10], group[10],
  45.        comment[30];
  46.   long l,l1;
  47.  
  48.   done=0;
  49.   do {
  50.     helpl=0;
  51.     nl();
  52.     prt(3,get_string(489));
  53.     ch=onek("QRNA");
  54.     switch(ch) {
  55.       case 'Q':
  56.         done=1;
  57.         break;
  58.       case 'R':
  59.         printfile("BBSLIST.MSG");
  60.         up(1);
  61.         pl("7══════════════════════════════╧════════════╧══════════════╧════════");
  62.         break;
  63.       case 'N':
  64.         print_net_listing(0);
  65.         break;
  66.       case 'A':
  67.         helpl=25;
  68.         if ((actsl<=10)) {
  69.           nl();
  70.           nl();
  71.           pl(get_string(490));
  72.           nl();
  73.           break;
  74.         }
  75.         if (thisuser.restrict & restrict_automessage) {
  76.           nl();
  77.           nl();
  78.           pl(get_string(491));
  79.           nl();
  80.           break;
  81.         }
  82.         nl();
  83.         pl(get_string(492));
  84.         pl(get_string(493));
  85.         outstr(":");
  86.         mpl(12);
  87.         input(phone,12);
  88.         if ((phone[3]!='-') || (phone[7]!='-'))
  89.           phone[0]=0;
  90.         for (i=0; i<12; i++) {
  91.           if (strchr("0123456789-",phone[i])==0)
  92.             phone[0]=0;
  93.         }
  94.         if (strlen(phone)==12) {
  95.           ok=1;
  96.           sprintf(s1,"%sBBSLIST.MSG",syscfg.gfilesdir);
  97.           f=sh_open1(s1,O_RDONLY | O_BINARY);
  98.           if (f>0) {
  99.             sh_lseek(f,0L,SEEK_SET);
  100.             l=filelength(f);
  101.             if ((ss=malloca(l+500L))==NULL) {
  102.               sh_close(f);
  103.               return;
  104.             }
  105.             sh_read(f,ss,(int)l);
  106.             l1=0L;
  107.             while ((l1<l) && (ok)) {
  108.               i=0;
  109.               do {
  110.                 ch=ss[l1++];
  111.                 s1[i]=ch;
  112.                 if (ch==13)
  113.                   s1[i]=0;
  114.                 ++i;
  115.               } while ((ch!=10) && (i<120) && (l1<l));
  116.               if (strstr(s1,phone)!=NULL)
  117.                 ok=0;
  118.               if (strncmp(s1,phone,12)==0)
  119.                 ok=0;
  120.             }
  121.             farfree(ss);
  122.             sh_close(f);
  123.           }
  124.           if (ok) {
  125.             pl(get_string(494));
  126.             nl();
  127.             nl();
  128.             pl(get_string(495));
  129.             outstr(":");
  130.             mpl(30);
  131.             name[0]=0;
  132.             inputl(name,30);
  133.             nl();
  134.             pl(get_string(496));
  135.             pl(get_string(497));
  136.             outstr(":");
  137.             mpl(4);
  138.             input(speed,4);
  139.             nl();
  140.             pl(get_string(498));
  141.             outstr(":");
  142.             mpl(9);
  143.             input(type,9);
  144.             nl();
  145.            pl("How many hard disk space this BBS has?");
  146.            outstr(":");
  147.            mpl(10);
  148.            inputl(meg,10);
  149.            if (meg[0]==0)
  150.              strcpy(meg,"Unknown");
  151.            nl();
  152.            pl("What is the new user password?");
  153.            outstr(":");
  154.            mpl(10);
  155.            inputl(nup,10);
  156.            if (nup[0]==0)
  157.              strcpy(nup,"None");
  158.            nl();
  159.            pl("Enter Group Affiliations");
  160.            outstr(":");
  161.            mpl(10);
  162.            inputl(group,10);
  163.            if (group[0]==0)
  164.              strcpy(group,"None");
  165.            nl();
  166.            pl("Enter Comment About This BBS");
  167.            outstr(":");
  168.            mpl(30);
  169.            inputl(comment,30);
  170.            nl();
  171.            sprintf(s3,"7══════════════════════════════╪════════════╪══════════════╪════════\r\n");
  172.            sprintf(s,"1%-30s7│9 %-10s 7│ 9%-12s 7│ 9%-5s\r\n",name, type, phone, speed);
  173.            sprintf(s2,"1%-30s7│9 %-10s 7│ 9%-12s 7│ 9%-5s\r\n",comment, meg, nup, group);
  174.            nl();
  175.            nl();
  176.            pl(s);
  177.            up(1);
  178.            pl(s2);
  179.            nl();
  180.            prt(9,get_string(499));
  181.             if (yn()) {
  182.               sprintf(s1,"%sBBSLIST.MSG",syscfg.gfilesdir);
  183.               f=sh_open(s1,O_RDWR | O_CREAT | O_BINARY, S_IREAD | S_IWRITE);
  184.               if (filelength(f)) {
  185.                 sh_lseek(f,-1L,SEEK_END);
  186.                 sh_read(f,((void *)&ch1),1);
  187.                 if (ch1==26)
  188.                   sh_lseek(f,-1L,SEEK_END);
  189.               }
  190.               sh_write(f,(void *)s3,strlen(s3));
  191.               sh_write(f,(void *)s,strlen(s));
  192.               sh_write(f,(void *)s2,strlen(s2));
  193.               sh_close(f);
  194.               nl();
  195.               pl(get_string(500));
  196.             }
  197.           } else {
  198.             pl(get_string(501));
  199.             nl();
  200.             nl();
  201.           }
  202.         } else {
  203.           nl();
  204.           pl(get_string(502));
  205.           nl();
  206.         }
  207.         break;
  208.     }
  209.   } while ((!done) && (!hangup));
  210. }
  211.  
  212. Step 2:
  213.  
  214. Delete your old BBSLIST.MSG in Gfiles dir, and ask other people to re-enter
  215. their datas in your new bbslist
  216.  
  217. Here is the attach file for header of the BBSLIST.MSG file, to explain how
  218. to read the new BBSLIST:
  219.  
  220. Cut as BBSLIST.MSG and change to your BBS name please.
  221. -------------------------------------------------------------------------
  222. 7Alternative Worlds BBS Listing
  223.  
  224. 7══════════════════════════════╤════════════╤══════════════╤════════
  225. 1BBS Name                      7│9 Software   7│ 9Phone Number 7│ 9Speed
  226. 1Comment On BBS                7│9 HD Space   7│ 9New User Pwd 7│ 9Group
  227. 7══════════════════════════════╧════════════╧══════════════╧════════
  228.  
  229. 7══════════════════════════════╤════════════╤══════════════╤════════
  230. -------------------------------------------------------------------------
  231.  
  232.  
  233. Step 3:
  234.  
  235. Recompile and enjoy, I actually did a mod that not require to compile entire
  236. BBS (thank me).
  237.  
  238. If you use this mod, let me know! I love to know who's using my mod and that
  239. way you'll be informed of maybe new updates. Also, if you see this mod on my
  240. system the color is very different I assure, but it's the same thing.
  241.  
  242. Hope you'll like it.
  243.  
  244. Where to reach me?
  245.  
  246.         At all header's address, and through my bulletin board:
  247.  
  248. Alternative Worlds, Official WWIV Support Board, (514)-664-4503
  249. From Montréal, Québec, Canada, Auto-SysOp Validation With No Ratio At 1st Call
  250.  
  251.